interface Person {
  name: "jack";
}

type INumber = number;

type IPerson = {
  name: string;
};

type Keys = "name" | "age";
// type 定义这种类型 ok
type XPerson = {
  [key in Keys]: string;
};

const p1: XPerson = {
  name: "jack",
  age: "18",
};

// 声明合并
interface YPerson {
  // [key in Keys]: string;
  name: string;
  age: string;
}

interface YPerson {
  sex: string;
}

interface Child extends YPerson {}

type ZPerson = IPerson & XPerson;
